Package jsyphon

Source Code of jsyphon.JSyphonClient

package jsyphon;

import java.util.HashMap;
import jsyphon.JSyphonImage;

public class JSyphonClient
{
  public JSyphonClient() { }
 
  static
  {
    System.loadLibrary("JSyphon");   
  }

  //Native method declarations
  public native void init();
 
  public native void setApplicationName(String appName);
 
  public native void setServerName(String serverName);
 
  public native boolean isValid();

  public native HashMap<String, String> serverDescription();
 
  public native boolean hasNewFrame();
 
  public native HashMap<String, Object> newFrameDataForContext();
 
  public native void stop();
 
  public JSyphonImage newFrameImageForContext() {
    HashMap<String, Object> dict = newFrameDataForContext();
    Long name = (Long)dict.get("name");
    Double width = (Double)dict.get("width");
    Double height = (Double)dict.get("height");
    return new JSyphonImage(name.intValue(), width.intValue(), height.intValue());
  }
}
TOP

Related Classes of jsyphon.JSyphonClient

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.